AxisWaitForTrigger
An axis starts a new move when the trigger condition is met.
Syntax
KsCommandStatus AxisWaitForTrigger(
int Index,
int TriggerIndex,
McBufferMode BufferMode
);
Parameters
Index: the index of a trigger target. Indexes are zero based. For example, if you want to use Axis 0 to trigger Axis 1 to do something, Index is 1.
TriggerIndex: the index of a trigger source. It is equal to the Index in SetTrigger. You can have up to 16 triggers.
BufferMode: the buffer mode. Triggers can either start immediately or be buffered. See the McBufferMode type.
- mcAborting: all queued moves are aborted. The target stops doing its current task, and starts to wait the trigger immediately. For example, if Axis 1 (target) is doing MoveAxisAbsolute, and the trigger is
mcAborting, it will stop MoveAxisAbsolute. The axis' state transitions to Continuous Motion and the axis starts to wait the trigger immediately. When the trigger condition is met, Axis 1 starts its new move. - mcBuffered: the target keeps doing its task. After it finishes, it starts to wait the trigger. For example, if Axis 1 (target) is doing MoveAxisAbsolute, and the trigger is
mcBuffered, it will continue doing MoveAxisAbsolute until it finishes, and then it starts to wait the trigger. When the trigger condition is met, Axis 1 starts its new move. - mcCancel: the target keeps doing its current task. The trigger is not added to the queue.
Return value
Returns the KsCommandStatus structure.
Example
N/A
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.3 | 4.3 |
| Header | ksmotion.h | ksmotion.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also